<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>在线考试</title>
    <script type="text/javascript" src="../js/mui/mui.min.js"></script>
    <script type="text/javascript" src="../js/angular/angular.min.js"></script>
    <script type="text/javascript" src="./index.js"></script>
    <script type="text/javascript" src="./shiai.js"></script>
    <link href="../stylesheets/mui/mui.min.css" rel="stylesheet" type="text/css"/>
</head>
<body ng-app="tinkcai.shiai">
    <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-back mui-pull-left"></a>
        <h1 class="mui-title">在线测试</h1>
    </header>
    <div ng-controller="shiaiController" class="mui-content">
        <div class="mui-content-padded">
            <h5 class="mui-content-padded">试题选择：</h5>
            <select class="mui-btn mui-btn-block" ng-model="selectModel" ng-change="changeTitle()" ng-options="n as n.title for n in shiai">
            </select>
        </div>
        <div id="bar" class="mui-text-center">
            <h5>答题进度</h5>
            <p class="mui-progressbar mui-progressbar-in" data-progress="20"><span></span></p>
        </div>
        <div class="mui-card" ng-repeat="q in model.exam track by $index" ng-show="currentIndex==$index">
            <div class="mui-card-header">{{$index + 1}}.&nbsp{{q.question}}</div>
            <div class="mui-card-content">
                <span class="mui-btn mui-btn-block" ng-class="{'mui-btn-success': option.isCorrect&&option.showAnswer, 'mui-btn-danger':(!option.isCorrect)&&option.showAnswer}" ng-repeat="option in q.options track by $index" ng-click="selectAnswer(option, q, $index)">
                    {{option.item}}
                </span>
            </div>
        </div>
        <button class="mui-btn mui-btn-block mui-btn-primary" ng-click="next()" ng-show="currentIndex < model.exam.length">下一题</button>
    </div>
</body>
</html>